<!DOCTYPE html>
<html lang="cn">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style type="text/css"></style>
   
</head>
<body>
  <script>
      // 自动转换
      
      //数字环境
      console.log(100 - '100');
      console.log(100 * false);
      console.log(100 / true);
      console.log(100 % true);

      //字符串 +
      console.log(100 + '100');
      console.log(100 + Number('100a'));

      //布尔环境
      //if(10+10){} => T/F

      //无穷数
      console.log(55/0);//Infinity
      console.log(-55/0);//-Infinity
      console.log(0/0);//NaN

      //浮点数的精度问题
      console.log(0.1+0.2);
      console.log((0.1+0.2).toFixed(2));

   </script>
</body>
</html>


